import os

file_name = input("输入文件名：")
ter_tuple = ("A","B","C","D","E","F","G","H","I","J")
fpr = open(file_name.split(".")[0]+"_result.txt","a")
for query_ter in ter_tuple:
	fpr.write("\n\n"+query_ter+" result\n\n")
	fp = open(file_name, "r")
	line = fp.readline().strip()
	while line:
		if line.split(" ")[1] == query_ter:
			break
		else:
			line = fp.readline().strip()
	if line:
		count = int(line.split(" ")[-2])
	while line: 
		if line.split(" ")[1] == query_ter:
			if ((int(line.split(" ")[-2])-1) != count) and ((int(line.split(" ")[-2])) != count):
				if(int(line.split(" ")[-2])!=170):
					fpr.write("\nPack Lose\n\n")
				else:
					if count!=250:
						fpr.write("\nPack Lose\n\n")
			count = int(line.split(" ")[-2])
			fpr.write(line+"\n")
		line = fp.readline().strip()
fp.close()
fpr.close()
print("执行完毕")


